package com.gitee.feizns.quickstart.ding.talk.spring.boot.autoconfigure;

import com.gitee.feizns.dynamic.bean.Beans;
import com.gitee.feizns.quickstart.ding.talk.Config;
import lombok.Data;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 钉钉属性
 * @author feizns
 * @since 2025/3/27
 */
@Data
@ToString(callSuper = true)
@ConfigurationProperties(prefix = "quickstart.ding-talk")
public class QuickstartDingTalkProperties {

    /**
     * AgentId
     */
    private Long agentId;

    /**
     * 企业编号
     */
    private String corpId;

    /**
     * api token
     */
    private String apiToken;

    /**
     * app key
     */
    private String appKey;

    /**
     * 密钥
     */
    private String appSecret;

    /**
     * 自动同步
     */
    private boolean autoSynchronize;

    /**
     * 配置
     * @return {@link Config }
     */
    public Config toConfig() {
        return Beans.copyProperties(Config.class, this);
    }

}
